﻿// ********************************
// 2010.11.11
// 拓扑模型
// Author:卢融凯
// ********************************
using System;
using System.Collections.Generic;
using System.Net;

namespace SManage.Infrastructure
{
    public class TopologyInfo : ITopologyInfo
    {
        public String Name { get; set; }
        public String Description { get; set; }
        public Int32? Type { get; set; }
        public IList<InterfaceIp> InterfaceIPs { get; set; }
        public IList<IpRoute> IpRoutes { get; set; }
        public IList<IpNetToMedia> IpNetToMedias { get; set; }
    }

    public class InterfaceIp 
    {
        public IPAddress IP { get; set; }
        public String Mask { get; set; }
    }

    public class IpRoute:IEquatable<IpRoute> {
        public IPAddress Dest { get; set; }
        public IPAddress Next { get; set; }
        public String Mask { get; set; }

        public bool Equals(IpRoute other)
        {
            return Next.ToString() == other.Next.ToString();
        }
    }

    public class IpNetToMedia
    {
        public String MAC { get; set; }
        public IPAddress IP { get; set; }
    }
}
